// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

import Axios from 'axios'
import qs from 'qs'

Vue.use(ElementUI);
Vue.prototype.$http = Axios
Vue.prototype.$qs = qs;
Vue.config.productionTip = false


new Vue({
  router,
  render: h => h(App)
}).$mount('#app')

Axios.defaults.baseURL = 'http://82.157.57.163:8301'
Axios.defaults.withCredentials = true
Axios.interceptors.request.use(config => {
  //   console.log(config)
  config.headers.Authorization = window.sessionStorage.getItem("token")

  return config
})
